/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package queenb.web.store;
import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import oracle.jdbc.OracleTypes;
import queenb.net.datacontrol.DataStatement;
import queenb.net.datacontrol.Param;
import queenb.net.entitybean.C300;
import queenb.web.util.PackageContants;
/**
 *
 * @author ems
 */
public class C300Store extends C300{
    public List<C300> listC300(String pnFC600,int pnPC300) throws SQLException, InstantiationException, IllegalAccessException {
        DataStatement dataStatement = new DataStatement(PackageContants.LIST_C300, OracleTypes.CURSOR, new Param[]{
                                                        new Param(OracleTypes.CHAR, pnFC600),
                                                        new Param(OracleTypes.INTEGER, pnPC300),
        });
        return super.find(dataStatement, C300.class);
    }


    public int deleteC300(int pnPC300,String pvLOGIN) throws SQLException, InstantiationException, IllegalAccessException {
        DataStatement dataStatement = new DataStatement(PackageContants.DELETE_Q150, OracleTypes.INTEGER, new Param[]{
                    new Param(OracleTypes.INTEGER, pnPC300),
                    new Param(OracleTypes.CHAR, pvLOGIN)
                });
        return update(dataStatement, C300.class);
    }

    public int updateC300( int pnFH000,
                            String pvFC600,
                            int  pnPC300,
                            int  pnFC500,
                            int pnFN100,
                            int pnFN550,
                            int pnFC200,
                            Date pdCD301,
                            Date pdCD302,
                            Date pdCD303 ,
                            String pvCV304,
                            String pvCV305 ,
                            String pvCV306,
                            int pnCN307,
                            String pvCV308 ,
                            int pnCN309 ,
                            int pnCN310 ,
                            String pvCV311 ,
                            String pvCV312 ,
                            String pvCV313 ,
                            String pvCV314 ,
                            int pnCN315 ,
                            int pnCN316,
                            String plCB317 ,
                            String pvLOGIN 

            ) throws SQLException {
        DataStatement updateStatement = new DataStatement(PackageContants.UPDATE_C300, OracleTypes.INTEGER, new Param[]{
                     new Param(OracleTypes.INTEGER, pnFH000),
                    new Param(OracleTypes.CHAR, pvFC600),
                    new Param(OracleTypes.INTEGER, pnPC300),
                    new Param(OracleTypes.INTEGER, pnFC500),
                    new Param(OracleTypes.INTEGER, pnFN100),
                    new Param(OracleTypes.INTEGER, pnFN550),
                    new Param(OracleTypes.INTEGER, pnFC200),
                    new Param(OracleTypes.DATE, pdCD301),
                    new Param(OracleTypes.DATE, pdCD302),
                    new Param(OracleTypes.DATE, pdCD303),
                    new Param(OracleTypes.CHAR, pvCV304),
                    new Param(OracleTypes.CHAR, pvCV305),
                    new Param(OracleTypes.CHAR, pvCV306),
                    new Param(OracleTypes.INTEGER, pnCN307),
                    new Param(OracleTypes.CHAR, pvCV308),
                    new Param(OracleTypes.INTEGER, pnCN309),
                    new Param(OracleTypes.INTEGER, pnCN310),
                    new Param(OracleTypes.CHAR, pvCV311),
                    new Param(OracleTypes.CHAR, pvCV312),
                    new Param(OracleTypes.CHAR, pvCV313),
                    new Param(OracleTypes.CHAR, pvCV314),
                    new Param(OracleTypes.INTEGER, pnCN315),
                    new Param(OracleTypes.INTEGER, pnCN316),
                    new Param(OracleTypes.CHAR, plCB317),
                    new Param(OracleTypes.CHAR, pvLOGIN)}
                    );
        return super.update(updateStatement, null);
    }
}
